package com.job.shuang.HomeWork0711.Final;

import com.job.shuang.HomeWork0711.SingletonPattern.Premier;

import java.util.Scanner;

/**
 * @author Liushuang
 * @version 1.0
 * @since 2022-07-11 21:01:11
 */
public class Testsss {
    public static void main(String[] args) {
        Scanner a=new Scanner(System.in);
        Scanner b=new Scanner(System.in);
        //获取a的运行时 类.              类的名字
        System.out.println(a.getClass().getName());

        Premier p1=Premier.GetInstance();
        Premier p2=Premier.GetInstance();

        System.out.println(p1.hashCode());
        System.out.println(p2.hashCode());

        System.out.println(a.hashCode());
        System.out.println(b.hashCode());

        //toString()  打印一个引用类型变量的时候，默认调用变量.

        System.out.println(p1);
        System.out.println(p1.toString());
    }
}
